import { getToken, setToken } from '@/utils/storage'

export default {
  // 开启命名空间
  namespaced: true,
  state: {
    //  存储token
    token: getToken()

  },
  mutations: {
    setUserToken (state, token) {
      state.token = token
      // 将token 存到本地
      setToken(token)
    }
  },
  actions: {},
  getters: {}
}
